package cn.tedu.hm.controller;

import cn.tedu.hm.pojo.Permission;
import cn.tedu.hm.service.PermissionService;
import cn.tedu.hm.wep.JsonPage;
import cn.tedu.hm.wep.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/*
 *说明
 *
 *@author:TanXulLiang
 *@data:2023/2/17
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/permission/")
@Api(tags="03. 菜单管理模块")
public class PermissionController {

    @Autowired
    PermissionService permissionService;

    @ApiOperation("查询菜单")
    @ApiOperationSupport(order = 100)
    @GetMapping("list")
    public JsonResult<List<Permission>> list(){
        return JsonResult.ok(permissionService.list());
    }

}
